/** 升降柱分组信息 */
import { Get, PostForm, PostJson, Post } from './request';

export interface ILiftingGroupItem {
    controlId: number,
    createId: number,
    createTime: string,
    groupId: number,
    id: number,
    orderNum: number,
    status: number,
    updateTime: string,
}
export interface ILiftingGroup {
    areaId: number,
    createId: number,
    createTime: string,
    id: number,
    liftings: ILiftingGroupItem[],
    name: string,
    updateTime: string
}
/** 获取区域内升降柱分组信息
 * areaId
 */
export const getLiftingGroupByArea = (params: any): Promise<ILiftingGroup[]> => Get('/liftinggroup/getByArea', params)

/** 创建升降柱分组信息 */
export const addLiftGroup = (data: any) => PostJson('/liftinggroup/save', data)

/** 更新升降柱分组信息 */
export const updateLiftGroup = (data: any) => PostJson('/liftinggroup/update', data)

/** 清除分组
 * areaId
 */
export const clearGroup = (data: any) => Post('/liftinggroup/clearGroup', data)